#pragma once
#include "Core.h"
#include "Window.h"
#include "Event\ApplicationEvent.h"
#include "Event\KeyEvent.h"
#include "LayerStack.h"
#include "ImguiLayer.h"
#include "Render\Shader.h"
#include "Render\Buffer.h"
#include "Render\VertexArray.h"
namespace Engine 
{
	class ENGINE_API Application
	{
	public:
		Application();
		~Application();
		void Run();
		void OnEvent(Event& e);

		void PushLayer(Layer* layer);
		void PushOverLayer(Layer* layer);
		Window& GetWindow() { return *m_WindowHandle; }
		static Application& Get() { return *ms_Instance; }
	private:
		bool OnWindowClose(WindowCloseEvent& e);
		//bool OnWindowResize(WindowResizeEvent& e);
		//bool OnKeyPressedEvent(KeyPressedEvent& e);
	private:
		bool m_IsRunning = true;
		Window* m_WindowHandle;
		ImGuiLayer* m_ImGuiLayer;
		LayerStack m_LayerStack;
		static Application* ms_Instance;
		std::shared_ptr<VertexArray> m_VertexArray;
		std::shared_ptr<VertexBuffer> m_VertexBuffer;
		std::shared_ptr<IndexBuffer> m_IndexBuffer;
		Shader* m_ShaderHandle;
	};
	Application* CreateApplication();
}

